﻿
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sproc_DeleteTask]') AND type in (N'P', N'PC'))
    DROP PROCEDURE [dbo].[sproc_DeleteTask];
GO
CREATE PROCEDURE [dbo].[sproc_DeleteTask]
    @TaskID int
/*

============================================================
功能:    删除任务
参数:
    @TaskID int        ：    被删除的任务ID
============================================================

*/
AS
    DELETE FROM UDS_Task 
        WHERE ID =@TaskID
            DELETE FROM UDS_Schedule 
        WHERE TaskID =@TaskID

    return @@error